package org.type4neo.imp;

import java.util.Iterator;

import org.neo4j.graphdb.Relationship;
import org.type4neo.bytecode.DynamicTyper;

public class RelationshipWrapperIterator implements Iterator<Relationship> {

	private Iterator<Relationship> baseIterator;

	public RelationshipWrapperIterator(Iterator<Relationship> baseIterator) {
		this.baseIterator = baseIterator;
	}

	public boolean hasNext() {
		return this.baseIterator.hasNext();
	}

	public Relationship next() {
		return DynamicTyper.wrapRelationship(this.baseIterator.next());
	}

	public void remove() {
		this.baseIterator.remove();
	}

}
